3.3.81 \(\int \frac {\cos ^3(c+d x) (a B+b B \cos (c+d x))}{a+b \cos (c+d x)} \, dx\) [281]

Optimal. Leaf size=28 \[ \frac {B \sin (c+d x)}{d}-\frac {B \sin ^3(c+d x)}{3 d} \]

[Out]

B*sin(d*x+c)/d-1/3*B*sin(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {21, 2713} \begin {gather*} \frac {B \sin (c+d x)}{d}-\frac {B \sin ^3(c+d x)}{3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]^3*(a*B + b*B*Cos[c + d*x]))/(a + b*Cos[c + d*x]),x]

[Out]

(B*Sin[c + d*x])/d - (B*Sin[c + d*x]^3)/(3*d)

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 2713

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rubi steps

\begin {align*} \int \frac {\cos ^3(c+d x) (a B+b B \cos (c+d x))}{a+b \cos (c+d x)} \, dx &=B \int \cos ^3(c+d x) \, dx\\ &=-\frac {B \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac {B \sin (c+d x)}{d}-\frac {B \sin ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 28, normalized size = 1.00 \begin {gather*} B \left (\frac {\sin (c+d x)}{d}-\frac {\sin ^3(c+d x)}{3 d}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]^3*(a*B + b*B*Cos[c + d*x]))/(a + b*Cos[c + d*x]),x]

[Out]

B*(Sin[c + d*x]/d - Sin[c + d*x]^3/(3*d))

________________________________________________________________________________________

Maple [A]
time = 0.16, size = 23, normalized size = 0.82

method result size
derivativedivides \(\frac {B \left (\cos ^{2}\left (d x +c \right )+2\right ) \sin \left (d x +c \right )}{3 d}\) \(23\)
default \(\frac {B \left (\cos ^{2}\left (d x +c \right )+2\right ) \sin \left (d x +c \right )}{3 d}\) \(23\)
risch \(\frac {3 B \sin \left (d x +c \right )}{4 d}+\frac {B \sin \left (3 d x +3 c \right )}{12 d}\) \(29\)
norman \(\frac {\frac {2 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {10 B \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {10 B \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {2 B \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}\) \(84\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/3/d*B*(cos(d*x+c)^2+2)*sin(d*x+c)

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
 for more de

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 25, normalized size = 0.89 \begin {gather*} \frac {{\left (B \cos \left (d x + c\right )^{2} + 2 \, B\right )} \sin \left (d x + c\right )}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x, algorithm="fricas")

[Out]

1/3*(B*cos(d*x + c)^2 + 2*B)*sin(d*x + c)/d

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 56 vs. \(2 (22) = 44\).
time = 0.46, size = 56, normalized size = 2.00 \begin {gather*} \begin {cases} \frac {2 B \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {B \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\\frac {x \left (B a + B b \cos {\left (c \right )}\right ) \cos ^{3}{\left (c \right )}}{a + b \cos {\left (c \right )}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x)

[Out]

Piecewise((2*B*sin(c + d*x)**3/(3*d) + B*sin(c + d*x)*cos(c + d*x)**2/d, Ne(d, 0)), (x*(B*a + B*b*cos(c))*cos(
c)**3/(a + b*cos(c)), True))

________________________________________________________________________________________

Giac [A]
time = 0.43, size = 25, normalized size = 0.89 \begin {gather*} -\frac {B \sin \left (d x + c\right )^{3} - 3 \, B \sin \left (d x + c\right )}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a*B+b*B*cos(d*x+c))/(a+b*cos(d*x+c)),x, algorithm="giac")

[Out]

-1/3*(B*sin(d*x + c)^3 - 3*B*sin(d*x + c))/d

________________________________________________________________________________________

Mupad [B]
time = 0.48, size = 24, normalized size = 0.86 \begin {gather*} \frac {B\,\left (9\,\sin \left (c+d\,x\right )+\sin \left (3\,c+3\,d\,x\right )\right )}{12\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(c + d*x)^3*(B*a + B*b*cos(c + d*x)))/(a + b*cos(c + d*x)),x)

[Out]

(B*(9*sin(c + d*x) + sin(3*c + 3*d*x)))/(12*d)

________________________________________________________________________________________